package me.passtime.projt.ivr;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import me.passtime.projt.Home;
import me.passtime.projt.R;
import me.passtime.projt.util.AlertDialogUtils;
import me.passtime.projt.util.PageJumpUtils;
import me.passtime.projt.util.SystemUtils;

/**
 * Created by IntelliJ IDEA.
 * User: Lee
 * Date: 11-12-17
 * Time: 下午5:04
 */
public class BindCardPage extends Activity implements View.OnClickListener{
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.bind_card);

        this.findViewById(R.id.bind_card_back_btn).setOnClickListener(this);
        this.findViewById(R.id.bind_card_logout_btn).setOnClickListener(this);
        this.findViewById(R.id.bind_card_my_account_btn).setOnClickListener(this);
        this.findViewById(R.id.bind_card_fee_records_btn).setOnClickListener(this);
        this.findViewById(R.id.bind_card_exit).setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.bind_card_back_btn:
                PageJumpUtils.jump(this, Home.class);
                break;
            case R.id.bind_card_logout_btn:
                PageJumpUtils.logoutAndJumpToMainPage(this);
                break;
            case R.id.bind_card_my_account_btn:
                PageJumpUtils.jumpToManageAccountPage(this);
                break;
            case R.id.bind_card_exit:
                PageJumpUtils.jumpToQueryPaymentPage(this);
                break;
            case R.id.change_password_exit:
                AlertDialogUtils.showYesNoDiaLog(this, "是否退出系统?", new AlertDialogUtils.Executor() {
                    @Override
                    public void execute() {
                        SystemUtils.killSelf();
                        finish();
                    }
                });
                break;

        }
    }
}
